package com.bwie.controller;

import com.bwie.service.TbRepairService;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/repair/repair")
@Slf4j
public class TbRepairController {
    @Autowired
    private TbRepairService tbRepairService;


    /**
     * @Auther:获取两周内的数据
     * @Date: 2024/11/5 9:01
     * @Description: TODO
     */
    @PostMapping(value = "/getRepairTwo")
    public R getRepairByCountWeekTwo(){
        return tbRepairService.getRepairByCountWeekTwo();
    }


    /**
     * @Auther:列表
     * @Date: 2024/11/5 11:24
     * @Description: TODO
     */
    @PostMapping(value = "/listPageRepair")
    public R listPageRepair(@RequestBody PageInfoVo pageInfoVo){
        return tbRepairService.listPageRepair(pageInfoVo);
    }

    /**
     * @Auther:获取派单类目
     * @Date: 2024/11/5 16:21
     * @Description: TODO
     */
    @PostMapping(value = "/gerTypeList")
    public R gerTypeList(){
        return tbRepairService.gerTypeList();
    }
}
